<?php
namespace Modules\Order\Models;
use Illuminate\Database\Eloquent\Model;
use Modules\Auth\Models\User;
use Modules\Order\Models\OrderDetail;
class Order extends Model{
    protected $table='orders';
    protected $fillable=[
        'order_id',
        'user_id',
        'amount',
        'status',
        'address',
        'express_type',
        'express_no',
        'pay_time',
        'pay_type',
        'trade_no',
    ];
    public function user(){
        return $this->belongsTo(User::class,'user_id','id');
    }
    public function orderDetail(){
        return $this->hasMany(OrderDetail::class,'order_id','id');
    }

}